package com.jbl.gof23.create.factory.simplefactory;

import com.jbl.gof23.create.factory.Car;
import com.jbl.gof23.create.factory.CarImpl;

/**
 * 简单工厂
 */
public class SimpleFactory {

    public static Car getCar(String car){
        if ("五菱".equals(car)){
            return new CarImpl();
        }
        if ("宝马".equals(car)){
            return new CarImpl();
        }
        return null;
    }

}
